package com.synesthesiaconsulting.gwt.resources.client;

import com.google.gwt.user.client.ui.Widget;

/**
 * Created by IntelliJ IDEA.
 * User: ageer
 * Date: Jul 24, 2008
 * Time: 5:15:30 PM
 * To change this template use File | Settings | File Templates.
 */
public class GWTActionUnitFactory {
    public static IActionUnit makeGWTNavigationUnit(String url, String target, String options) {
        return new GWTUrlActionUnit(url, target, options);
    }
    public static IActionUnit makeGWTNavigationUnit(String url, String target) {
        return new GWTUrlActionUnit(url, target);
    }
    public static IActionUnit makeGWTNavigationUnit(String url) {
        return new GWTUrlActionUnit(url);
    }
    public static IActionUnit makeGWTNavigationUnit(Widget w, Boolean b) {
        return new GWTWidgetActionUnit(w, b);
    }
    public static IActionUnit makeGWTNavigationUnit(Widget w) {
        return new GWTWidgetActionUnit(w);
    }

    public static IActionUnit makeNoActionUnit() {
        return new IActionUnit() {
            public void applyAction(Object applyTo) {

            }
        };
    }
}
